home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
snpd1292.zip
/
DOW.H
< prev
next >
Wrap
Text File
|
1992-12-26
|
525b
|
18 lines
/*
** DOW.H - day-of-week macro. From the FidoNet CECHO - by
** Paul Schlyter.
*/
#ifdef ISO /* International Monday-Sunday calendars */
#define dow(y,m,d) \
( ( ( 3*(y) - (7*((y)+((m)+9)/12))/4 + (23*(m))/9 + (d) + 2 \
+ (((y)-((m)<3))/100+1) * 3 / 4 - 16 ) % 7 ) )
#else /* Sunday-Saturday (i.e. U.S.) calendars */
#define dow(y,m,d) \
( ( ( 3*(y) - (7*((y)+((m)+9)/12))/4 + (23*(m))/9 + (d) + 2 \
+ (((y)-((m)<3))/100+1) * 3 / 4 - 15 ) % 7 ) )
#endif